-
Notifications
You must be signed in to change notification settings - Fork 17
feat: snippets for table (under tree dots in navigation tree) #1476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
5e7367f to
c198207
Compare
| { | ||
| paths, | ||
| database, | ||
| timeout, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should exclude timeout (and probably concurrentId) in serializeQueryArgs, otherwise your getTableSchemaData will always initiate a new request and will never reuse data from other request to overviewApi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In current versions there is always a new request, even if entity overview have already been loaded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed timeout and concurrentId
now queries use same api and timeout moved to front with Promise.race and wait
| paths: [path], | ||
| database: tenantName, | ||
| timeout: TABLE_SCHEMA_TIMEOUT, | ||
| concurrentId: getTableSchemaDataConcurrentId + 'getOverview', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need concurrentId here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
| getTableSchemaData: build.mutation<SchemaData[], GetTableSchemaDataParams>({ | ||
| queryFn: async ({path, tenantName, type}, {dispatch}) => { | ||
| try { | ||
| const schemaData = await dispatch( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you really need this request for view? Probably, you should check if it's a table here
if (isViewType(type)){
// do request for a view
} else {
// do request for a table
}There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
|
We use tableSchemaDataApi as a distinct mutation that is declared in SchemaTree so that we can get IsLoading parameter (in the next task) that will show loading state in the button (after some work in NavigationTree component) |
Closes #1299
CI Results
Test Status:⚠️ FLAKY
📊 Full Report
Bundle Size: 🔺
Current: 78.94 MB | Main: 78.94 MB
Diff: +0.01 MB (0.01%)
ℹ️ CI Information